<template>
  <footer class="footer">
    <div class="footer-content">
      <div class="footer-section">
        <a href="mailto:hi@cursor.com" class="email-link">hi@cursor.com ↗</a>
        <div class="certifications">
          <span>SOC 2 Certified</span>
          <span>Made by Anysphere</span>
        </div>
      </div>

      <div class="footer-links">
        <div class="link-group">
          <router-link to="/pricing">定价</router-link>
          <router-link to="/download">下载</router-link>
          <router-link to="/docs">文档</router-link>
          <router-link to="/forum">论坛</router-link>
        </div>

        <div class="link-group">
          <router-link to="/jobs">招聘</router-link>
          <router-link to="/company">公司</router-link>
          <router-link to="/security">安全</router-link>
          <router-link to="/team">团队</router-link>
        </div>

        <div class="link-group">
          <a href="/changelog">系统</a>
          <a href="/updates">更新日志</a>
          <a href="https://github.com/cursor" target="_blank">GitHub</a>
          <a href="https://twitter.com/cursor" target="_blank">Twitter</a>
        </div>

        <div class="settings">
          <div class="language-selector">
            <select v-model="currentLanguage">
              <option value="zh">Chinese</option>
              <option value="en">English</option>
            </select>
          </div>
          <div class="theme-toggle">
            <button class="theme-btn" @click="toggleTheme">
              <span class="light">☀️</span>
              <span class="dark">🌙</span>
            </button>
          </div>
        </div>
      </div>
    </div>
  </footer>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const currentLanguage = ref('zh')

const toggleTheme = () => {
  // 实现主题切换逻辑
  document.body.classList.toggle('dark-theme')
}
</script>

<style scoped lang="less">
.footer {
  background-color: #000;
  color: #fff;
  padding: 3rem 2rem;
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .footer-section {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .email-link {
      color: #fff;
      text-decoration: none;
      font-size: 1.1rem;
      
      &:hover {
        text-decoration: underline;
      }
    }

    .certifications {
      display: flex;
      gap: 1rem;
      opacity: 0.6;
      font-size: 0.9rem;
    }
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;

    .link-group {
      display: flex;
      flex-direction: column;
      gap: 1rem;

      a {
        color: #fff;
        text-decoration: none;
        opacity: 0.8;
        transition: opacity 0.2s;

        &:hover {
          opacity: 1;
        }
      }
    }

    .settings {
      .language-selector {
        select {
          background: transparent;
          color: #fff;
          border: 1px solid rgba(255, 255, 255, 0.2);
          padding: 0.5rem;
          border-radius: 4px;
          cursor: pointer;
          
          option {
            background: #000;
          }
        }
      }

      .theme-toggle {
        margin-top: 1rem;
        
        .theme-btn {
          background: transparent;
          border: 1px solid rgba(255, 255, 255, 0.2);
          color: #fff;
          padding: 0.5rem;
          border-radius: 4px;
          cursor: pointer;
          display: flex;
          gap: 0.5rem;
        }
      }
    }
  }
}

@media (max-width: 768px) {
  .footer {
    .footer-links {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

@media (max-width: 480px) {
  .footer {
    .footer-section {
      flex-direction: column;
      gap: 1rem;
      text-align: center;
    }

    .footer-links {
      grid-template-columns: 1fr;
      text-align: center;
    }
  }
}
</style>